﻿using Common;
using Microsoft.Practices.Prism.Events;
using Microsoft.Practices.Prism.Regions;
using Microsoft.Practices.Unity;
using WPTrek.Data;
using WPTrek.Gui.Services;

namespace WPTrek.Gui.ViewModels
{
    public class GameViewModel : ViewModelBase, IGameViewModel
    {
        public GameViewModel(IUnityContainer container, IEventAggregator eventAggregator, IRegionManager regionManager, IDataService dataService)
            : base(container, eventAggregator, regionManager)
        {
            this.dataService = dataService;

            Universe = dataService.GetUniverse();

        }

        #region IGameViewModel Members

        public IUniverse Universe
        {
            get
            {
                return universe;
            }
            private set
            {
                universe = value;
                RaisePropertyChanged(() => Universe);
            }
        }

        #endregion

        #region Private fields

        private readonly IDataService dataService;
        private IUniverse universe;

        #endregion
    }
}
